<p>The <em>File</em> note type can be used to attach various external files
  such as images, videos or PDF documents.</p>
<h2>Uploading a file</h2>
<p>Since these files come from an external source, it is not possible to
  create a <em>File</em> note type directly:</p>
<ul>
  <li>Drag a file into the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.</li>
  <li>Right click a note and select <em>Import into note</em> and point it to
    one of the supported files.</li>
</ul>
<h2>Supported file types</h2>
<h3>PDFs</h3>
<figure class="image image-style-align-center image_resized" style="width:50%;">
  <img style="aspect-ratio:933/666;" src="File_image.png" width="933" height="666">
</figure>
<p>PDFs can be browsed directly from Trilium.</p>
<p>Interaction:</p>
<ul>
  <li>Press the menu icon at the top-left to see a preview (thumbnail) of all
    the pages, as well as a table of contents (if the PDF has this information).</li>
  <li>See or edit the page number at the top.</li>
  <li>Adjust the zoom using the buttons at the top or manually editing the value.</li>
  <li>Rotate the document if it's in the wrong orientation.</li>
  <li>In the contextual menu:
    <ul>
      <li>View two pages at once (great for books).</li>
      <li>Toggle annotations (if present in the document).</li>
      <li>View document properties.</li>
    </ul>
  </li>
</ul>
<h3>Images</h3>
<figure class="image image-style-align-center image_resized" style="width:50%;">
  <img style="aspect-ratio:879/766;" src="4_File_image.png" width="879"
  height="766">
</figure>
<p>Interaction:</p>
<ul>
  <li><em>Copy reference to clipboard</em>, for embedding the image within&nbsp;
    <a
    class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes. See&nbsp;<a class="reference-link" href="#root/_help_0Ofbk1aSuVRu">Image references</a>&nbsp;for
      more information.</li>
</ul>
<h3>Videos</h3>
<figure class="image image-style-align-center image_resized" style="width:50%;">
  <img style="aspect-ratio:854/700;" src="1_File_image.png" width="854"
  height="700">
</figure>
<p>Video files can be added in as well. The file is streamed directly, so
  when accessing the note from a server it doesn't have to download the entire
  video to start playing it.</p>
<aside class="admonition caution">
  <p>Although Trilium offers support for videos, it is generally not meant
    to be used with very large files. Uploading large videos will cause the&nbsp;
    <a
    class="reference-link" href="#root/_help_wX4HbRucYSDD">Database</a>&nbsp;to balloon as well as the any&nbsp;<a class="reference-link"
      href="#root/_help_ODY7qQn5m2FT">Backup</a>&nbsp;of it. In addition to that,
      there might be slowdowns when first uploading the files. Otherwise, a large
      database should not impact the general performance of Trilium significantly.</p>
</aside>
<h3>Audio</h3>
<figure class="image image_resized image-style-align-center" style="width:50%;">
  <img style="aspect-ratio:850/243;" src="3_File_image.png" width="850"
  height="243">
</figure>
<p>Adding a supported audio file will reveal a basic audio player that can
  be used to play it.</p>
<p>Interactions:</p>
<ul>
  <li>The audio can be played/paused using the dedicated button.</li>
  <li>Dragging the mouse across, or clicking the progress bar will seek through
    the song.</li>
  <li>The volume can be set.</li>
  <li>The playback speed can be adjusted via the contextual menu next to the
    volume.</li>
</ul>
<h3>Text files</h3>
<figure class="image image-style-align-center image_resized" style="width:50%;">
  <img style="aspect-ratio:926/347;" src="2_File_image.png" width="926"
  height="347">
</figure>
<p>Files that are identified as containing text will show a preview of their
  content. One common use case for this type of file is to embed text files
  whose content is not necessarily of interest to the user, such as third-party
  libraries or generated content, that can then be downloaded if needed.</p>
<p>Note that generally text files will be <a href="#root/_help_mHbBMPDPkVV5">imported</a> as
  either&nbsp;<a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;or&nbsp;
  <a
  class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;notes. To bypass this behavior and create a <em>File</em> note
    type, use the <em>Import into note</em> feature and uncheck <em>Import HTML, Markdown and TXT as text notes</em>,
    as well as <em>Import recognized code files as code notes</em>.&nbsp;</p>
<p>Since one of the use cases for having files instead of notes is to display
  large files, the content preview is limited to a relatively small amount
  of characters. To view the full file, consider opening it in an external
  application.</p>
<h3>Unknown file types</h3>
<figure class="image image_resized image-style-align-center" style="width:50%;">
  <img style="aspect-ratio:532/240;" src="5_File_image.png" width="532"
  height="240">
</figure>
<p>If the file could not be identified as any of the supported file types
  from above, it will be treated as an unknown file. In this case, all the
  default interactions will be available such as downloading or opening the
  file externally, but there will be no preview of the content.</p>
<h2>Interaction</h2>
<ul>
  <li>Regardless of the file type, a series of buttons will be displayed in
    the <em>Image</em> or <em>File</em> tab in the&nbsp;<a class="reference-link"
    href="#root/_help_BlN9DFI679QC">Ribbon</a>.
    <ul>
      <li><em>Download</em>, which will download the file for local use.</li>
      <li><em>Open</em>, will will open the file with the system-default application.</li>
      <li>Upload new revision to replace the file with a new one.</li>
    </ul>
  </li>
  <li>It is <strong>not</strong> possible to change the note type of a <em>File</em> note.</li>
  <li>Convert into an <a href="#root/_help_0vhv7lsOLy82">attachment</a> from the
    <a
    href="#root/_help_8YBEPzcpUgxw">note menu</a>.</li>
</ul>
<h2>Relation with other notes</h2>
<ul>
  <li>
    <p>Files are also displayed in the&nbsp;<a class="reference-link" href="#root/_help_0ESUbbAxVnoK">Note List</a>&nbsp;based
      on their type:</p>
    <img class="image_resized" style="aspect-ratio:853/315;width:50%;"
    src="6_File_image.png" width="853" height="315">
  </li>
  <li>
    <p>Non-image files can be embedded into text notes as read-only widgets via
      the&nbsp;<a class="reference-link" href="#root/_help_nBAXQFj20hS1">Include Note</a>&nbsp;functionality.</p>
  </li>
  <li>
    <p>Image files can be embedded into text notes like normal images via&nbsp;
      <a
      class="reference-link" href="#root/_help_0Ofbk1aSuVRu">Image references</a>.</p>
  </li>
</ul>